package cn.itcast.bos.service.baseImpl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.domain.Specification;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import cn.itcast.bos.dao.base.CourierRepository;
import cn.itcast.bos.domain.base.Courier;
import cn.itcast.bos.service.base.CourierService;
@Service
@Transactional
public class CourierServiceImpl implements CourierService {
	@Autowired
    private CourierRepository courierRepository;
	@Override
	public void save(Courier courier) {
		// TODO Auto-generated method stub
		courierRepository.save(courier);
	}
	@Override
	public Page<Courier> findPageData(Specification specification,Pageable pageable) {
		// TODO Auto-generated method stub
		return  courierRepository.findAll(specification,pageable);
	}
	@Override

	public void updateDelTag(int id) {
		// TODO Auto-generated method stub	
		courierRepository.updateDelTag(id);
	}
	@Override
	public void updateRecTag(int id) {
		// TODO Auto-generated method stub
		courierRepository.updateRecTag(id);
	}

}
